Goto

Collaborating Authors

 forward function




Scalable Optimization in the Modular Norm

arXiv.org Artificial Intelligence

To improve performance in contemporary deep learning, one is interested in scaling up the neural network in terms of both the number and the size of the layers. When ramping up the width of a single layer, graceful scaling of training has been linked to the need to normalize the weights and their updates in the "natural norm" particular to that layer. In this paper, we significantly generalize this idea by defining the modular norm, which is the natural norm on the full weight space of any neural network architecture. The modular norm is defined recursively in tandem with the network architecture itself. We show that the modular norm has several promising applications. On the practical side, the modular norm can be used to normalize the updates of any base optimizer so that the learning rate becomes transferable across width and depth. This means that the user does not need to compute optimizer-specific scale factors in order to scale training. On the theoretical side, we show that for any neural network built from "well-behaved" atomic modules, the gradient of the network is Lipschitz-continuous in the modular norm, with the Lipschitz constant admitting a simple recursive formula. This characterization opens the door to porting standard ideas in optimization theory over to deep learning. We have created a Python package called Modula that automatically normalizes weight updates in the modular norm of the architecture. The package is available via "pip install modula" with source code at https://github.com/jxbz/modula.


Rubik's Optical Neural Networks: Multi-task Learning with Physics-aware Rotation Architecture

arXiv.org Artificial Intelligence

Recently, there are increasing efforts on advancing optical neural networks (ONNs), which bring significant advantages for machine learning (ML) in terms of power efficiency, parallelism, and computational speed. With the considerable benefits in computation speed and energy efficiency, there are significant interests in leveraging ONNs into medical sensing, security screening, drug detection, and autonomous driving. However, due to the challenge of implementing reconfigurability, deploying multi-task learning (MTL) algorithms on ONNs requires re-building and duplicating the physical diffractive systems, which significantly degrades the energy and cost efficiency in practical application scenarios. This work presents a novel ONNs architecture, namely, \textit{RubikONNs}, which utilizes the physical properties of optical systems to encode multiple feed-forward functions by physically rotating the hardware similarly to rotating a \textit{Rubik's Cube}. To optimize MTL performance on RubikONNs, two domain-specific physics-aware training algorithms \textit{RotAgg} and \textit{RotSeq} are proposed. Our experimental results demonstrate more than 4$\times$ improvements in energy and cost efficiency with marginal accuracy degradation compared to the state-of-the-art approaches.


#025 FaceNet: A Unified Embedding for Face Recognition and Clustering in PyTorch - Master Data Science 05.01.2022

#artificialintelligence

Highlights: Face recognition represents an active area of research for more than 3 decades. This paper, FaceNet, published in 2015, introduced a lot of novelties and significantly improved the performance of face recognition, verification, and clustering tasks. Here, we explore this interesting framework that become popular for introducing 1) 128-dimensional face embedding vector and 2) triplet loss function. In addition to the theoretical background, we give an outline of how this network can be implemented in PyTorch. FaceNet method developed a novel design for the final layer of the CNN to embed the face image. This, so called, embedding vector is of size 128 elements.


Torch -- Logistic Regression on Iris dataset

#artificialintelligence

The Iris dataset is a multivariate dataset describing the three species of Iris โ€” Iris setosa, Iris virginica and Iris versicolor. It contains the sepal length, sepal width, petal length and petalโ€ฆ


Training Neural Networks Using the Property of Negative Feedback to Inverse a Function

arXiv.org Artificial Intelligence

With high forward gain, a negative feedback system has the ability to perform the inverse of a linear or non linear function that is in the feedback path. This property of negative feedback systems has been widely used in analog circuits to construct precise closed-loop functions. This paper describes how the property of a negative feedback system to perform inverse of a function can be used for training neural networks. This method does not require that the cost or activation functions be differentiable. Hence, it is able to learn a class of non-differentiable functions as well where a gradient descent-based method fails. We also show that gradient descent emerges as a special case of the proposed method. We have applied this method to the MNIST dataset and obtained results that shows the method is viable for neural network training. This method, to the best of our knowledge, is novel in machine learning.


JAX: Differentiable Computing by Google

#artificialintelligence

Since deep learning took off in the early 2010s, many frameworks were written to facilitate deep learning in both research and production. For the record, let us mention Caffe, Theano, Torch, Lasagne, Tensorflow, Keras or PyTorch. Some of these frameworks disappeared after a while. Others survived and thrive to this day, mainly PyTorch and Tensorflow. Over time, these frameworks evolved into large ecosystems with many different functionalities.


How to Build Your Own PyTorch Neural Network Layer from Scratch

#artificialintelligence

Within the class, we'll need an __init__ dunder function to initialize our linear layer and a forward function to do the forward calculation. We'll use the PyTorch official document as a guideline to build our module. From the document, an nn.Linear module has the following attributes: So we'll get these three attributes in: The class also needs to hold weight and bias parameters so it can be trained. Here we used torch.nn.Parameter to set our weight and bias, otherwise, it won't train. Also, note that we used torch.randn